Revert "gtk: Pass font options along"
authorMatthias Clasen <mclasen@redhat.com>
Sat, 4 Sep 2021 18:51:41 +0000 (14:51 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 4 Sep 2021 19:42:05 +0000 (15:42 -0400)
This reverts commit 062a15310aefd7feac19a5b7d2c3257d317dfff9.

gtk/gskpango.c
gtk/gskpango.h
gtk/gtksnapshot.c
gtk/gtksnapshotprivate.h

index 93aba75f6011a6bf03832b5df1ea875c4eb171c8..e96c84a2fc64de155bd86d409acee1776fd760c7 100644 (file)
@@ -100,7 +100,6 @@ gsk_pango_renderer_draw_glyph_item (PangoRenderer  *renderer,
   get_color (crenderer, PANGO_RENDER_PART_FOREGROUND, &color);
 
   gtk_snapshot_append_text (crenderer->snapshot,
-                            crenderer->options,
                             glyph_item->item->analysis.font,
                             glyph_item->glyphs,
                             &color,
@@ -468,18 +467,14 @@ gtk_snapshot_append_layout (GtkSnapshot   *snapshot,
                             const GdkRGBA *color)
 {
   GskPangoRenderer *crenderer;
-  PangoContext *context;
 
   g_return_if_fail (snapshot != NULL);
   g_return_if_fail (PANGO_IS_LAYOUT (layout));
 
   crenderer = gsk_pango_renderer_acquire ();
 
-  context = pango_layout_get_context (layout);
-
   crenderer->snapshot = snapshot;
   crenderer->fg_color = color;
-  crenderer->options = pango_cairo_context_get_font_options (context);
 
   pango_renderer_draw_layout (PANGO_RENDERER (crenderer), layout, 0, 0);
 
index 05fa2254a0b26ddc51151b6f592a08ae1d202944..672128d1c134a1d06fd5200a86f0fd9275fdc783 100644 (file)
@@ -63,8 +63,6 @@ struct _GskPangoRenderer
   /* Error underline color for this widget */
   GdkRGBA               *error_color;
 
-  const cairo_font_options_t  *options;
-
   GskPangoRendererState  state;
 
   guint                  is_cached_renderer : 1;
index b8d0968c8ff51b5e79b08e698521f96866168334..5ebb37f14fc7b1fcbfdff0f518bcd6591d17037e 100644 (file)
@@ -2121,24 +2121,22 @@ gtk_snapshot_render_layout (GtkSnapshot     *snapshot,
 }
 
 void
-gtk_snapshot_append_text (GtkSnapshot                *snapshot,
-                          const cairo_font_options_t *options,
-                          PangoFont                  *font,
-                          PangoGlyphString           *glyphs,
-                          const GdkRGBA              *color,
-                          float                       x,
-                          float                       y)
+gtk_snapshot_append_text (GtkSnapshot           *snapshot,
+                          PangoFont             *font,
+                          PangoGlyphString      *glyphs,
+                          const GdkRGBA         *color,
+                          float                  x,
+                          float                  y)
 {
   GskRenderNode *node;
   float dx, dy;
 
   gtk_snapshot_ensure_translate (snapshot, &dx, &dy);
 
-  node = gsk_text_node_new_with_font_options (options,
-                                              font,
-                                              glyphs,
-                                              color,
-                                              &GRAPHENE_POINT_INIT (x + dx, y + dy));
+  node = gsk_text_node_new (font,
+                            glyphs,
+                            color,
+                            &GRAPHENE_POINT_INIT (x + dx, y + dy));
   if (node == NULL)
     return;
 
index ca32df1a52afb3ceec2d153eac28c387b594f989..99714c5a9909c614a14998c77f7f34c6ae9c9a43 100644 (file)
 
 G_BEGIN_DECLS
 
-void                    gtk_snapshot_append_text                (GtkSnapshot                *snapshot,
-                                                                 const cairo_font_options_t *options,
-                                                                 PangoFont                  *font,
-                                                                 PangoGlyphString           *glyphs,
-                                                                 const GdkRGBA              *color,
-                                                                 float                       x,
-                                                                 float                       y);
+void                    gtk_snapshot_append_text                (GtkSnapshot            *snapshot,
+                                                                 PangoFont              *font,
+                                                                 PangoGlyphString       *glyphs,
+                                                                 const GdkRGBA          *color,
+                                                                 float                   x,
+                                                                 float                   y);
 
 void                    gtk_snapshot_push_collect               (GtkSnapshot            *snapshot);
 GskRenderNode *         gtk_snapshot_pop_collect                (GtkSnapshot            *snapshot);